import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Random;
import java.util.Scanner;
public class main {
    public static void main(String[] args) {
        int[]arr={1,2,3,4,5,6,7};
        int tem;
//        for (int i = 0,j= arr.length-1; i < arr.length / 2; i++,j--) {
//            if(i>=j){
//                break;
//            }
//            tem=arr[i];
//            arr[i]=arr[j];
//            arr[j]=tem;
//        }
        for (int i = 0; i < arr.length / 2; i++) {
            tem=arr[i];
            arr[i]=arr[arr.length-1-i];
            arr[arr.length-1-i]=tem;
        }
        System.out.println(Arrays.toString(arr));
    }
    public static void main5(String[] args) {
        int[]arr={22,66,53,10,96,11,61};
        for (int i = 0; i < arr.length - 1; i++) {
            for (int j = 0; j < arr.length - 1-i; j++) {
                int tem;
                if(arr[j]>arr[j+1]){
                    tem=arr[j];
                    arr[j]=arr[j+1];
                    arr[j+1]=tem;
                }
            }
        }
        System.out.println(Arrays.toString(arr));
    }
    public static void main4(String[] args) {
        Random random=new Random();
        int arr[]=new int[10];
        for (int i = 0; i < 10; i++) {
            arr[i]=random.nextInt(100)+1;
        }
        System.out.println(Arrays.toString(arr));
    }
//    public static void main(String[] args) {
//        int arr1[]=new int[9];
//        int arr2[]={1,2,3,4,5,6,7,8,9};
//        System.out.println(Arrays.toString(arr1));
//        System.arraycopy(arr2,1,arr1,0,arr2.length-3);
//        System.out.println(Arrays.toString(arr1));
//        int arr3[][]={{1,2,3},{4,5,6}};
//        System.out.println(Arrays.toString(arr3));
//        System.out.println(Arrays.deepToString(arr3));
//
//    }
//}
public static void main2(String[] args) {
    int arr[]={11,22,44,55};
    int add=33;
    int dex=-1;//要插入的地方
    for (int i = 0; i < arr.length; i++) {
        if(arr[i]>add){
            dex=i;
            break;
        }
    }
    if(dex==-1){
        dex= arr.length;
    }
    int newArr[]=new int[arr.length+1];
    for (int i=0,j=0;i<newArr.length;i++){
        if(i!=dex){
            newArr[i]=arr[j];
            j++;
        }else {
            newArr[i]=add;
        }
    }
    arr=newArr;
    System.out.println(Arrays.toString(arr));
}
public static void main1(String[] args) {
//    fun(623);
    String []strs=new String[]{"asd","asd"};
    String []str1={"asd","saf"};
    int a=1;
    for (int i = 0; i < 10; i++) {
        a++;
    }
    System.out.println(a);
}
public static void fun(int n)
{

    if(n<10)
    {
        System.out.print(n+" ");
        return ;//归的起点
    }
    fun(n/10);
//    System.out.print(n%10+" ");
}
}